<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>主推任务管理-总部</title>
        <link rel="stylesheet" href="css/reset.css" />
        <link rel="stylesheet" href="css/platform.css" />
        <link rel="stylesheet" href="css/table.css" />
        <link rel="stylesheet" href="js/ui/jquery-ui.min.css" />
        <link rel="stylesheet" href="css/mainpush.css" />
        <style type="text/css">
        	.u-multiform .column .cell{margin-right:30px;}
        	.temp-download{font-size:12px;}
        	.ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year{
        		width:40px;height:20px;margin-right:10px;
        	}
        </style>
    </head>

    <body>
        <div class="header">
            <div class="u-title">总部主推任务管理</div>
        </div>
        <div class="container" ms-controller="mainController">
            <div class="cnt-box">
                <div class="u-multiform">
                    <div class="column">
                        <div class="cell">
                            <label>任务主题：</label>
                            <input class="u-ipt" type="text" placeholder="输入任务主题" ms-duplex="taskTopic" />
                        </div>
                        <div class="cell">
                            <label>任务时间：</label>
                            <div class="cnt-box">
                                <input class="u-ipt ipt-datepicker" type="text" id="month" placeholder="开始时间" ms-duplex="month" />
                            </div>
                        </div>
                    </div>
                    <div class="column">
                        <div class="cell">
                            <label></label>
                            <button class="u-btn small" ms-click="searchTask">查询</button>
                        </div>
                    </div>
                </div>
                <a href="addHqTask.html" class="u-btn small add-task">新增任务</a>
            </div>
            <div id="taskTable" ms-controller="taskTable"></div>
            <script type="avalon" id="tabletask">
                <div class="tableWrapper">
                    <table class="table">
                        <thead>
                            <tr>
                                <th>任务主题</th>
                                <th>创建时间</th>
                                <th>任务状态</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ms-repeat-row="sources" >
                                <td>{{row.taskTopic}}</td>
                                <td>{{row.createTime | date("yyyy-MM-dd HH:mm:ss")}}</td>
                                <td>{{row.runStatus | filterTaskStatus }}</td>
                                <td class="operate">
                                    <div ms-if="row.runStatus == 0">
                                        <a  ms-attr-href="viewHqTask.html?hqTaskId={{row.id}}">查看</a>
                                    </div>
									<div ms-if="row.runStatus > 0">
                                        <a  ms-attr-href="viewHqTask.html?hqTaskId={{row.id}}">查看</a>
										<a  ms-attr-href="editHqTask.html?hqTaskId={{row.id}}">修改</a>
										<a  href="javascript:;" ms-click="customFuncs.delTaskPop(row)">删除</a>
                                    </div>
									  
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="4">
                                    <div class="pager">
                                        <div class="first-page" ms-click="firstpage" ms-class={{firstpagestyle}}>首页</div>
                                        <div class="pre-page" ms-click="prepage" ms-class={{prepagestyle}}>上一页</div>
                                        <div class="current-page">
                                            第<input class="current-page-num" type="text" ms-duplex="currentpage" ms-input="jumppage" />页
                                            <span class="totalpage">共 {{totalpage}} 页</span>
                                        </div>
                                        <div class="next-page" ms-click="nextpage" ms-class={{nextpagestyle}}>下一页</div>
                                        <div class="last-page" ms-click="lastpage" ms-class={{lastpagestyle}}>尾页</div>
                                        <div class="messageinfo">{{startrow}}-{{endrow}} 共{{total}}条</div>
                                    </div>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </script>
            
        </div>
        <div ms-controller="popController">
            <div class="u-popup" id="popup_del">
                <div class="bg"></div>
                <div class="asTable">
                    <div class="asTableCell">
                        <div class="asCell alert">
                            <a href="javascript:;" class="close btn-close">×</a>
                            <p class="title">提示</p>
                            <div class="container">
                                <div class="warning"></div>
                                <p>确定要删除该任务吗？</p>
                            </div>
                            <div class="btn-box">
                                <button class="u-btn" ms-click="delData()">确定</button>
                                <button class="u-btn gray btn-close">取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="u-popup" id="popup_tips">
                <div class="bg"></div>
                <div class="asTable">
                    <div class="asTableCell">
                        <div class="asCell alert">
                            <a href="javascript:;" class="close btn-close">×</a>
                            <p class="title">提示</p>
                            <div class="container">
                                <div class="error"></div>
                                <p></p>
                            </div>
                            <div class="btn-box">
                                <button class="u-btn btn-close">确定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
		<div class="loadData" ></div>
        <script src="js/jquery.min.js"></script>
        <script src="js/avalon.shim.sn.js"></script>
        <script src="js/ui/jquery-ui.min.js"></script>
        <script src="js/ui/jquery-ui.datepicker.min.js"></script>
        <script src="js/swift-ui-table-1.1.js"></script>
        <script src="js/platform.js"></script>
        <script src="js/DataInterface/DataInterface.js"></script>
        <script src="js/mainpush.js"></script>
	</body>
</html>
